package com.quanyan.place.service;

import com.quanyan.api.APIResponse;
import com.quanyan.common.Plugin.PageObj;
import com.quanyan.place.entity.TbBizPlaceSaleDetail;
import com.quanyan.place.entity.apiresp.*;
import com.quanyan.place.entity.vo.*;
import com.quanyan.place.request.SaleDatailRequest;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * PlaceSaleService
 * 场馆销售相关接口
 * @author Li Shuai
 * @date 16/4/14
 */
public interface PlaceSaleService<T> {
    /**
     * 场馆销售概况
     * @param reqPlaceSale
     * @return
     *//*
    PlaceSaleProtateVo placeSaleProtateByCity(ReqPlaceSale reqPlaceSale);
*//**
     * 场馆销售概况
     * @return
     *//*
    PageObj<List<PlaceSaleProtateVo>> placeSaleProtateVoList(ReqPlaceSale reqPlaceSale);

    *//**
     * 根据场馆id查看销售详情 列表
     * @param placeId
     * @return
     *//*
    RespPlaceSale viewPlaceSaleByPlaceId(Integer placeId);

    *//**
     * 根据场馆id查询已销售场地信息
     * @param placeId
     * @return
     *//**//*
    List<PlaceSaleUnitDetailVo> getPlaceUnitInfoEnableToSale(Integer placeId);*//*
    *//**
     * 根据场馆id查询已购买销售场地信息
     * @param placeId
     * @return
     *//*
    List<PlaceSaleUnitDetailVo> getPlaceUnitInfoYetSale(Integer placeId);
    *//**
     * 根据场馆id删除销售记录
     * @param placeId
     * @return
     *//*
    boolean delPlaceSaleByPlaceId(Integer placeId);
    *//**
     * 保存销售记录
     * @return
     *//*
    int savePlaceSale(ReqPlaceSaleVo reqPlaceSaleVo);
    *//**
     * 修改销售记录
     * @return
     *//*
    int updatePlaceSale(ReqPlaceSaleVo reqPlaceSaleVo);

    List<TbBizPlaceSaleDetail> placeUnitSaleDetail(int placeId);

    *//**
     * 查询场馆在一段时间的销售情况
     * @param request
     * @return
     *//*
    Map<String,List<TbBizPlaceSaleDetailVo>> getSaleData(SaleDatailRequest request);

    *//**
     * 场馆销售记录 按场馆统计信息
     * @param reqPlaceSale
     * @return
     *//*
    PageObj<List<PlaceSaleDetailVo>> getPlaceSaleRecordList(ReqPlaceSale reqPlaceSale);
//    List<PlaceSaleDetailVo> getPlaceSaleRecordList(ReqPlaceSale reqPlaceSale);

    PlaceKpiInfo getPlaceSignAndSaleRate(Integer placeId, Integer unitId, Date startDate, Date endDate);

//    String checkTimeForSale(Map map);
//    String checkTimeForSale(Map map);

    List<PlaceSaleUnitDetailVo> getPlaceUnitEnableToSaleTimes(ReqPlaceSale reqPlaceSale);*/

    /**
     * 场地销售明细
     * @param map
     * @return
     */
    APIResponse<PageObj<RespPlaceUnitSaleDetailSum>> getUnitSaleDetail(@Param("map")Map<String,Object> map);

    /**
     * 场地销售明细导出
     * @param map
     * @return
     */
    APIResponse<RespPlaceUnitSaleDetailSum> getUnitSaleDetailExport(@Param("map")Map<String,Object> map);

    /**
     * 场地销售统计   --场地编号
     * @param map
     * @return
     */
    APIResponse<PageObj<RespUnitSaleStatisticsPlaceCodeSum>> getUnitSaleStatisticsByPlaceCode(@Param("map")Map<String, Object> map);

    /**
     * 场地销售统计   --场地编号（导出）
     * @param map
     * @return
     */
    APIResponse<RespUnitSaleStatisticsPlaceCodeSum> getUnitSaleStatisticsByPlaceCodeExport(@Param("map")Map<String, Object> map);

    /**
     * 场地销售统计   --销售渠道
     * @param map
     * @return
     */
    APIResponse<RespUnitSaleStatisticsOrderChannelSum> getUnitSaleStatisticsByOrderChannel(@Param("map")Map<String, Object> map);

    /**
     * 场地销售统计   --运动项目
     * @param map
     * @return
     */
    APIResponse<RespUnitSaleStatisticsCategorySum> getUnitSaleStatisticsByCategory(Map<String, Object> map);

    /**
     * 场地销售统计   --散客会员
     * @param map
     * @return
     */
    APIResponse<?> getUnitSaleStatisticsByMember(Map<String, Object> map);


    /**
     * 场地销售tab排序获取
     * @param placeId
     * @return
     */
    APIResponse<?> getSaleTab(Integer placeId);

    /**
     * 场地销售tab排序设置
     * @param placeId
     * @param saleTab
     * @return
     */
    APIResponse<?> setSaleTab(Integer placeId, String saleTab);



    /**
     * 营业台根据商品条形码查询商品信息
     */
    APIResponse<?> getGoodsInfoByBarCode(Integer placeId, String goodsBarCode);

    /**
     * 补充散客信息姓名
     * @param customerName
     * @param placeOrderId
     * @return
     */
    APIResponse<?> supplementFITName(String customerName,String placeOrderId);

    /**
     * 补充散客信息电话
     * @param mobile
     * @param placeOrderId
     * @return
     */
    APIResponse<?> supplementFITMobile( String mobile, String placeOrderId);
}
